<?php

namespace module\manage\validate;

use app\Validate;

class ActivityAlbum extends Validate
{
    /**
     * 所有验证场景需要的字段.
     *
     * @var array<array>
     */
    protected $scene = [
        'save' => ['content', 'step', 'activity_id', 'step']
    ];
    /**
     * Get the validation rules that apply to the request.
     *
     * @var array<string>
     */
    protected $rule = [
        'id' => 'require|integer|max:10|>:0',
        'content' => 'requireWithout:id|max:60',  // 内容
        'activity_id' => 'requireWithout:id|integer|max:10',  // 活动  
        'step' => 'requireWithout:id|integer', // 第几步    
        'status' => 'in:1,2',  // 状态
    ];
    /**
     * 验证字段描述
     * 
     * @var array<string>
     */
    protected $field = [
        'id' => 'ID',
        'content' => '内容',  // 内容
        'activity_id' => '活动',  // 活动
        'step' => '第几步',
        'status' => '状态',  // 状态
    ];
}
